R Markdown

This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see http://rmarkdown.rstudio.com.

When you click the Knit button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this: data()

summary(cars)
##      speed           dist       
##  Min.   : 4.0   Min.   :  2.00  
##  1st Qu.:12.0   1st Qu.: 26.00  
##  Median :15.0   Median : 36.00  
##  Mean   :15.4   Mean   : 42.98  
##  3rd Qu.:19.0   3rd Qu.: 56.00  
##  Max.   :25.0   Max.   :120.00

Including Plots

You can also embed plots, for example:

plot(cars$speed, cars$dist)

Here’s an example using the ploty package to chart a breakdown of quality from the canned r dataset “diamonds.” diamonds

fig <- ggplot2::diamonds
fig <- fig %>% count(cut, clarity)
fig <- fig %>% plot_ly(x = ~cut, y = ~n, color = ~clarity)
fig
## No trace type specified:
##   Based on info supplied, a 'bar' trace seems appropriate.
##   Read more about this trace type -> https://plotly.com/r/reference/#bar

^ The info above is for reference. You’ll want to delete it before you produce your final rmd file.

Your rmd should contain your data processing notes so that someone else could replicate your work.

Here’s the structure for your final project.

Your data

Tell me about the data your are using. Think about what someone reading this might want to know. Include a link to the data source.

Literature review/clip search

How has the data been used by other news outlets or researchers? What can you learn from that?

Data vetting

Tell me how you checked/vetted your data (see data vetting guide in Class 2’s module). You should include every question, even if you didn’t find any issues and explain how you checked. You also can use plots and graphs here to explain your data distribution, etc…

Findings/Visualizations

Tell me your top 3 to 5 findings. Here you can add visualizations along with text to report what the data show.

You have a lot of latitude (and some longitude) with your visualizations, but they should involves data that can be analyzed. Your final visualizations could include Datawrapper or Flourish charts, maps, timelines or other ways to visualize your findings. If you have not already done so, please set up a one-on-one to discuss your project. As you progress, I’m happy to provide guidance.

You will present your findings and visualization on Dec. 5. We’ll have some guests coming to hear about your projects.